Exporting picture and ole

Hello

I am writing a DXL script where i have to export OLE as well as picture from the same object. I found a method who does exact that 

string exportPicture(EmbeddedOleObject oleObject,string fileName,int format)

But when i run it  I came accross this error everysingle time.

 

 

Here Object O contains both picture and  OLE (word File)

 

If anyone can help me to understand  how this method works and/or why i am getting this message will really be appreciated 

Thanks


DastanAli - Sun Dec 10 00:31:05 EST 2017

Re: Exporting picture and ole
chrisroy - Tue Apr 03 10:04:57 EDT 2018

Move the exportPicture function up under 'ole = rtf.getEmbeddedOle' and you won't get that error.  You'll also want to set the file name to include the path.

If you wrap the exportPicture with 'if(!null ole){ }' you won't get that error and you will get a return 'Can't get bitmap of OLE Object'.  Chances are the error is occurring because DOORS is pre-checking the code and can see that the fatal error may occur (however, I don't know DOORS DXL down to that level).

Regards,

Christopher